1. Field of the Invention
The present invention relates to computer-generated graphics. In particular, the present invention relates to the architecture of a reconfigurable texture cache and methods relating to the use of a texture cache.
2. Discussion of the Related Art
Texture mapping is a technique for mapping an image ("texture map") onto a surface of a computer-generated objected, so as to allow the object to appear more realistic in a displayed scene. The surfaces of the object are typically represented by polygons and texture mapping allows a texture to be superimposed onto each polygon, using transformation techniques that compensate the appearance of the texture in each polygon for lighting conditions, angles of viewing and other conditions which may affect the appearance of the object. Many elements of the theory and techniques of texture mapping are known to those skilled in the art.
Typically, the texture map is provided as a two-dimensional image represented in a coordinate system, referred to as "texture space" T(u,v). Texture mapping maps the relevant portion or portions of the texture map onto the surfaces of the object provided in the object's three dimensional coordinate system, typically referred to as "object space" O(x', y', z'). The textured mapped image of the object can then be displayed the object on a graphical display by projecting the textured object onto a two-dimensional coordinate system "screen space" S(x, y). A pixel within the texture is often referred to as a "texel".
The transformations which typically accompany texture mapping includes translation, rotation, modulations of surface color (sometimes referred to as "diffuse reflective coefficients") and specularity (a measure of the roughness of the object surface as it relates to the object's "shininess") and anti-aliasing. Texture maps, like most graphical images, are typically stored in memory optimized for access in raster scan line order. However, as used for texture mapping, the orientation of the mapped texture on an object surface is typically random, and benefits very little (from the stand point of minimizing the number of memory accesses to retrieve the texels), if at all, to the raster order.
A popular technique for anti-aliasing in this context is "mip-mapping", which attempts to provide a relevant "level of detail" of the texture map based on an apparent distance d of the object to the viewer. In mip-mapping, rather than texture mapping from a single image of the texture map, a series of derived images of successively lower resolutions (e.g., factor of 2 degradation in resolution between two derived images)are obtained by filtering a "base" image of the texture map. Each derived image corresponds to a level of detail relevant to viewing the texture map from a specified apparent distance. Texture mapping can be performed using any one of a number of filtering modes known to those skilled in the art, including (a) point sampling, which selects for each texel in the resulting texture the nearest texel in the highest resolution texture map; (b) bilinear, which interpolates each texel of the resulting texture from the four closest texels in the highest resolution texture map; (c) MIP1, which selects for each texel of the resulting texture the nearest texel in the texture map of nearest level of detail; (d) MIP2, which linearly interpolates, for each texel of the resulting texture, between the nearest texels in the texture maps of the two nearest levels of detail; (e) MIP4, which interpolates bilinearly, for each texel of the resulting texture, four nearest texels in the texture map of the nearest level of detail; and (f) MIP8, which interpolates trilinearly, for each texel of the resulting texture, four texels in each of the texture maps of the two nearest levels of detail.
Image processing typically involves one or more fast central processing units (CPU) in conjunction with a large amount of memory for image data and intermediate results. As can be seen from the description above, texture mapping is both computationally and memory access intensive. For example, in a trilinear operation under mip-mapping, eight texels are fetched from two images. Since the texels fetched under texture mapping are spatially correlated (e.g., neighboring texels), a memory architecture taking advantage of this spatial locality of reference is desired.